home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / grph.dxr / 00016_print button.ls < prev    next >
Encoding:
Text File  |  2000-01-28  |  1.6 KB  |  61 lines

  1. property ancestor, pMIAW
  2. global gIsRolloverTextOn
  3.  
  4. on new me, buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant
  5.   if objectp(descendant) then
  6.     ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant)
  7.   else
  8.     ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, me)
  9.   end if
  10.   set the cursor of sprite the pChannel of me to [member("point hand", "graph.cst"), member("point hand mask", "graph.cst")]
  11.   return me
  12. end
  13.  
  14. on setMIAW me, miaw
  15.   pMIAW = miaw
  16.   return me
  17. end
  18.  
  19. on performFunction me
  20.   global gEnvironObj, gGraph
  21.   tell the stage
  22.     playSFX(5)
  23.   end tell
  24.   if not isMemoryAvailable("print the document", 1200, 500) then
  25.     exit
  26.   end if
  27.   doc = new(xtra("PrintOMatic"))
  28.   if not objectp(doc) then
  29.     alert("A problem was encountered while initializing the printer.")
  30.     exit
  31.   else
  32.     setLandscapeMode(doc, 1)
  33.     pageW = getPageWidth(doc)
  34.     pageH = getPageHeight(doc)
  35.     setTextJust(doc, "centered")
  36.     append(doc, member("title", "internal"))
  37.     append(doc, RETURN & RETURN & RETURN)
  38.     drawStagePicture(doc, point(0, 36), rect(4, 40, 635, 404), 1)
  39.     setDocumentName(doc, "American History")
  40.     if doJobSetup(doc) then
  41.       print(doc)
  42.     end if
  43.     doc = 0
  44.   end if
  45.   return me
  46. end
  47.  
  48. on performRolloverFunction me
  49.   if gIsRolloverTextOn then
  50.     performRolloverFunction(ancestor)
  51.   end if
  52.   return me
  53. end
  54.  
  55. on performRolloffFunction me
  56.   if gIsRolloverTextOn then
  57.     performRolloffFunction(ancestor)
  58.   end if
  59.   return me
  60. end
  61.